from comment.utils.Serilalizers import BaseListSerilizer


class BankCardListSerializer(BaseListSerilizer):
    '''
    银行卡列表数据 序列化的类
    '''
    def to_dict(self):
        lst=[]
        for card  in self.data_list:
            lst.append({
                'cardId':card.bankInfoId,
                'cardNum':card.bankCardNum,
                'bankName':card.openingBank
            })

        return lst